3.1077 \(\int (a+i a \tan (e+f x))^3 (c+d \tan (e+f x))^3 \, dx\)

Optimal. Leaf size=190 \[ \frac {a^3 (-11 d+i c) (c+d \tan (e+f x))^4}{20 d^2 f}-\frac {\left (a^3+i a^3 \tan (e+f x)\right ) (c+d \tan (e+f x))^4}{5 d f}+\frac {4 i a^3 (c+d \tan (e+f x))^3}{3 f}+\frac {2 a^3 (d+i c) (c+d \tan (e+f x))^2}{f}+\frac {4 i a^3 d (c-i d)^2 \tan (e+f x)}{f}+\frac {4 a^3 (d+i c)^3 \log (\cos (e+f x))}{f}+4 a^3 x (c-i d)^3 \]

[Out]

4*a^3*(c-I*d)^3*x+4*a^3*(I*c+d)^3*ln(cos(f*x+e))/f+4*I*a^3*(c-I*d)^2*d*tan(f*x+e)/f+2*a^3*(I*c+d)*(c+d*tan(f*x
+e))^2/f+4/3*I*a^3*(c+d*tan(f*x+e))^3/f+1/20*a^3*(I*c-11*d)*(c+d*tan(f*x+e))^4/d^2/f-1/5*(a^3+I*a^3*tan(f*x+e)
)*(c+d*tan(f*x+e))^4/d/f

________________________________________________________________________________________

Rubi [A]  time = 0.34, antiderivative size = 190, normalized size of antiderivative = 1.00, number of steps used = 6, number of rules used = 5, integrand size = 28, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.179, Rules used = {3556, 3592, 3528, 3525, 3475} \[ \frac {a^3 (-11 d+i c) (c+d \tan (e+f x))^4}{20 d^2 f}-\frac {\left (a^3+i a^3 \tan (e+f x)\right ) (c+d \tan (e+f x))^4}{5 d f}+\frac {4 i a^3 (c+d \tan (e+f x))^3}{3 f}+\frac {2 a^3 (d+i c) (c+d \tan (e+f x))^2}{f}+\frac {4 i a^3 d (c-i d)^2 \tan (e+f x)}{f}+\frac {4 a^3 (d+i c)^3 \log (\cos (e+f x))}{f}+4 a^3 x (c-i d)^3 \]

Antiderivative was successfully verified.

[In]

Int[(a + I*a*Tan[e + f*x])^3*(c + d*Tan[e + f*x])^3,x]

[Out]

4*a^3*(c - I*d)^3*x + (4*a^3*(I*c + d)^3*Log[Cos[e + f*x]])/f + ((4*I)*a^3*(c - I*d)^2*d*Tan[e + f*x])/f + (2*
a^3*(I*c + d)*(c + d*Tan[e + f*x])^2)/f + (((4*I)/3)*a^3*(c + d*Tan[e + f*x])^3)/f + (a^3*(I*c - 11*d)*(c + d*
Tan[e + f*x])^4)/(20*d^2*f) - ((a^3 + I*a^3*Tan[e + f*x])*(c + d*Tan[e + f*x])^4)/(5*d*f)

Rule 3475

Int[tan[(c_.) + (d_.)*(x_)], x_Symbol] :> -Simp[Log[RemoveContent[Cos[c + d*x], x]]/d, x] /; FreeQ[{c, d}, x]

Rule 3525

Int[((a_) + (b_.)*tan[(e_.) + (f_.)*(x_)])*((c_.) + (d_.)*tan[(e_.) + (f_.)*(x_)]), x_Symbol] :> Simp[(a*c - b
*d)*x, x] + (Dist[b*c + a*d, Int[Tan[e + f*x], x], x] + Simp[(b*d*Tan[e + f*x])/f, x]) /; FreeQ[{a, b, c, d, e
, f}, x] && NeQ[b*c - a*d, 0] && NeQ[b*c + a*d, 0]

Rule 3528

Int[((a_.) + (b_.)*tan[(e_.) + (f_.)*(x_)])^(m_)*((c_.) + (d_.)*tan[(e_.) + (f_.)*(x_)]), x_Symbol] :> Simp[(d
*(a + b*Tan[e + f*x])^m)/(f*m), x] + Int[(a + b*Tan[e + f*x])^(m - 1)*Simp[a*c - b*d + (b*c + a*d)*Tan[e + f*x
], x], x] /; FreeQ[{a, b, c, d, e, f}, x] && NeQ[b*c - a*d, 0] && NeQ[a^2 + b^2, 0] && GtQ[m, 0]

Rule 3556

Int[((a_) + (b_.)*tan[(e_.) + (f_.)*(x_)])^(m_)*((c_.) + (d_.)*tan[(e_.) + (f_.)*(x_)])^(n_), x_Symbol] :> Sim
p[(b^2*(a + b*Tan[e + f*x])^(m - 2)*(c + d*Tan[e + f*x])^(n + 1))/(d*f*(m + n - 1)), x] + Dist[a/(d*(m + n - 1
)), Int[(a + b*Tan[e + f*x])^(m - 2)*(c + d*Tan[e + f*x])^n*Simp[b*c*(m - 2) + a*d*(m + 2*n) + (a*c*(m - 2) +
b*d*(3*m + 2*n - 4))*Tan[e + f*x], x], x], x] /; FreeQ[{a, b, c, d, e, f, n}, x] && NeQ[b*c - a*d, 0] && EqQ[a
^2 + b^2, 0] && NeQ[c^2 + d^2, 0] && IntegerQ[2*m] && GtQ[m, 1] && NeQ[m + n - 1, 0] && (IntegerQ[m] || Intege
rsQ[2*m, 2*n])

Rule 3592

Int[((a_.) + (b_.)*tan[(e_.) + (f_.)*(x_)])^(m_.)*((A_.) + (B_.)*tan[(e_.) + (f_.)*(x_)])*((c_.) + (d_.)*tan[(
e_.) + (f_.)*(x_)]), x_Symbol] :> Simp[(B*d*(a + b*Tan[e + f*x])^(m + 1))/(b*f*(m + 1)), x] + Int[(a + b*Tan[e
 + f*x])^m*Simp[A*c - B*d + (B*c + A*d)*Tan[e + f*x], x], x] /; FreeQ[{a, b, c, d, e, f, A, B, m}, x] && NeQ[b
*c - a*d, 0] &&  !LeQ[m, -1]

Rubi steps

\begin {align*} \int (a+i a \tan (e+f x))^3 (c+d \tan (e+f x))^3 \, dx &=-\frac {\left (a^3+i a^3 \tan (e+f x)\right ) (c+d \tan (e+f x))^4}{5 d f}+\frac {a \int (a+i a \tan (e+f x)) (a (i c+9 d)+a (c+11 i d) \tan (e+f x)) (c+d \tan (e+f x))^3 \, dx}{5 d}\\ &=\frac {a^3 (i c-11 d) (c+d \tan (e+f x))^4}{20 d^2 f}-\frac {\left (a^3+i a^3 \tan (e+f x)\right ) (c+d \tan (e+f x))^4}{5 d f}+\frac {a \int (c+d \tan (e+f x))^3 \left (20 a^2 d+20 i a^2 d \tan (e+f x)\right ) \, dx}{5 d}\\ &=\frac {4 i a^3 (c+d \tan (e+f x))^3}{3 f}+\frac {a^3 (i c-11 d) (c+d \tan (e+f x))^4}{20 d^2 f}-\frac {\left (a^3+i a^3 \tan (e+f x)\right ) (c+d \tan (e+f x))^4}{5 d f}+\frac {a \int (c+d \tan (e+f x))^2 \left (20 a^2 (c-i d) d+20 a^2 d (i c+d) \tan (e+f x)\right ) \, dx}{5 d}\\ &=\frac {2 a^3 (i c+d) (c+d \tan (e+f x))^2}{f}+\frac {4 i a^3 (c+d \tan (e+f x))^3}{3 f}+\frac {a^3 (i c-11 d) (c+d \tan (e+f x))^4}{20 d^2 f}-\frac {\left (a^3+i a^3 \tan (e+f x)\right ) (c+d \tan (e+f x))^4}{5 d f}+\frac {a \int (c+d \tan (e+f x)) \left (20 a^2 (c-i d)^2 d+20 i a^2 (c-i d)^2 d \tan (e+f x)\right ) \, dx}{5 d}\\ &=4 a^3 (c-i d)^3 x+\frac {4 i a^3 (c-i d)^2 d \tan (e+f x)}{f}+\frac {2 a^3 (i c+d) (c+d \tan (e+f x))^2}{f}+\frac {4 i a^3 (c+d \tan (e+f x))^3}{3 f}+\frac {a^3 (i c-11 d) (c+d \tan (e+f x))^4}{20 d^2 f}-\frac {\left (a^3+i a^3 \tan (e+f x)\right ) (c+d \tan (e+f x))^4}{5 d f}-\left (4 a^3 (i c+d)^3\right ) \int \tan (e+f x) \, dx\\ &=4 a^3 (c-i d)^3 x+\frac {4 a^3 (i c+d)^3 \log (\cos (e+f x))}{f}+\frac {4 i a^3 (c-i d)^2 d \tan (e+f x)}{f}+\frac {2 a^3 (i c+d) (c+d \tan (e+f x))^2}{f}+\frac {4 i a^3 (c+d \tan (e+f x))^3}{3 f}+\frac {a^3 (i c-11 d) (c+d \tan (e+f x))^4}{20 d^2 f}-\frac {\left (a^3+i a^3 \tan (e+f x)\right ) (c+d \tan (e+f x))^4}{5 d f}\\ \end {align*}

________________________________________________________________________________________

Mathematica [B]  time = 10.95, size = 1564, normalized size = 8.23 \[ \text {result too large to display} \]

Antiderivative was successfully verified.

[In]

Integrate[(a + I*a*Tan[e + f*x])^3*(c + d*Tan[e + f*x])^3,x]

[Out]

(Cos[e + f*x]^3*((-I)*c^3*Cos[(3*e)/2] - 3*c^2*d*Cos[(3*e)/2] + (3*I)*c*d^2*Cos[(3*e)/2] + d^3*Cos[(3*e)/2] -
c^3*Sin[(3*e)/2] + (3*I)*c^2*d*Sin[(3*e)/2] + 3*c*d^2*Sin[(3*e)/2] - I*d^3*Sin[(3*e)/2])*(2*Cos[(3*e)/2]*Log[C
os[e + f*x]^2] - (2*I)*Log[Cos[e + f*x]^2]*Sin[(3*e)/2])*(a + I*a*Tan[e + f*x])^3)/(f*(Cos[f*x] + I*Sin[f*x])^
3) + (Sec[e]*Sec[e + f*x]^2*(Cos[3*e]/240 - (I/240)*Sin[3*e])*((-45*I)*c^3*Cos[f*x] - 405*c^2*d*Cos[f*x] + (58
5*I)*c*d^2*Cos[f*x] + 225*d^3*Cos[f*x] + 300*c^3*f*x*Cos[f*x] - (900*I)*c^2*d*f*x*Cos[f*x] - 900*c*d^2*f*x*Cos
[f*x] + (300*I)*d^3*f*x*Cos[f*x] - (45*I)*c^3*Cos[2*e + f*x] - 405*c^2*d*Cos[2*e + f*x] + (585*I)*c*d^2*Cos[2*
e + f*x] + 225*d^3*Cos[2*e + f*x] + 300*c^3*f*x*Cos[2*e + f*x] - (900*I)*c^2*d*f*x*Cos[2*e + f*x] - 900*c*d^2*
f*x*Cos[2*e + f*x] + (300*I)*d^3*f*x*Cos[2*e + f*x] - (15*I)*c^3*Cos[2*e + 3*f*x] - 135*c^2*d*Cos[2*e + 3*f*x]
 + (225*I)*c*d^2*Cos[2*e + 3*f*x] + 105*d^3*Cos[2*e + 3*f*x] + 150*c^3*f*x*Cos[2*e + 3*f*x] - (450*I)*c^2*d*f*
x*Cos[2*e + 3*f*x] - 450*c*d^2*f*x*Cos[2*e + 3*f*x] + (150*I)*d^3*f*x*Cos[2*e + 3*f*x] - (15*I)*c^3*Cos[4*e +
3*f*x] - 135*c^2*d*Cos[4*e + 3*f*x] + (225*I)*c*d^2*Cos[4*e + 3*f*x] + 105*d^3*Cos[4*e + 3*f*x] + 150*c^3*f*x*
Cos[4*e + 3*f*x] - (450*I)*c^2*d*f*x*Cos[4*e + 3*f*x] - 450*c*d^2*f*x*Cos[4*e + 3*f*x] + (150*I)*d^3*f*x*Cos[4
*e + 3*f*x] + 30*c^3*f*x*Cos[4*e + 5*f*x] - (90*I)*c^2*d*f*x*Cos[4*e + 5*f*x] - 90*c*d^2*f*x*Cos[4*e + 5*f*x]
+ (30*I)*d^3*f*x*Cos[4*e + 5*f*x] + 30*c^3*f*x*Cos[6*e + 5*f*x] - (90*I)*c^2*d*f*x*Cos[6*e + 5*f*x] - 90*c*d^2
*f*x*Cos[6*e + 5*f*x] + (30*I)*d^3*f*x*Cos[6*e + 5*f*x] - 270*c^3*Sin[f*x] + (1140*I)*c^2*d*Sin[f*x] + 1260*c*
d^2*Sin[f*x] - (470*I)*d^3*Sin[f*x] + 180*c^3*Sin[2*e + f*x] - (810*I)*c^2*d*Sin[2*e + f*x] - 990*c*d^2*Sin[2*
e + f*x] + (360*I)*d^3*Sin[2*e + f*x] - 180*c^3*Sin[2*e + 3*f*x] + (750*I)*c^2*d*Sin[2*e + 3*f*x] + 810*c*d^2*
Sin[2*e + 3*f*x] - (280*I)*d^3*Sin[2*e + 3*f*x] + 45*c^3*Sin[4*e + 3*f*x] - (225*I)*c^2*d*Sin[4*e + 3*f*x] - 3
15*c*d^2*Sin[4*e + 3*f*x] + (135*I)*d^3*Sin[4*e + 3*f*x] - 45*c^3*Sin[4*e + 5*f*x] + (195*I)*c^2*d*Sin[4*e + 5
*f*x] + 225*c*d^2*Sin[4*e + 5*f*x] - (83*I)*d^3*Sin[4*e + 5*f*x])*(a + I*a*Tan[e + f*x])^3)/(f*(Cos[f*x] + I*S
in[f*x])^3) + (x*Cos[e + f*x]^3*(-2*c^3*Cos[e] + (6*I)*c^2*d*Cos[e] + 6*c*d^2*Cos[e] - (2*I)*d^3*Cos[e] + 2*c^
3*Cos[e]^3 - (6*I)*c^2*d*Cos[e]^3 - 6*c*d^2*Cos[e]^3 + (2*I)*d^3*Cos[e]^3 + (4*I)*c^3*Sin[e] + 12*c^2*d*Sin[e]
 - (12*I)*c*d^2*Sin[e] - 4*d^3*Sin[e] - (8*I)*c^3*Cos[e]^2*Sin[e] - 24*c^2*d*Cos[e]^2*Sin[e] + (24*I)*c*d^2*Co
s[e]^2*Sin[e] + 8*d^3*Cos[e]^2*Sin[e] - 12*c^3*Cos[e]*Sin[e]^2 + (36*I)*c^2*d*Cos[e]*Sin[e]^2 + 36*c*d^2*Cos[e
]*Sin[e]^2 - (12*I)*d^3*Cos[e]*Sin[e]^2 + (8*I)*c^3*Sin[e]^3 + 24*c^2*d*Sin[e]^3 - (24*I)*c*d^2*Sin[e]^3 - 8*d
^3*Sin[e]^3 + 2*c^3*Sin[e]*Tan[e] - (6*I)*c^2*d*Sin[e]*Tan[e] - 6*c*d^2*Sin[e]*Tan[e] + (2*I)*d^3*Sin[e]*Tan[e
] + 2*c^3*Sin[e]^3*Tan[e] - (6*I)*c^2*d*Sin[e]^3*Tan[e] - 6*c*d^2*Sin[e]^3*Tan[e] + (2*I)*d^3*Sin[e]^3*Tan[e]
+ ((-I)*c - d)^3*(4*Cos[3*e] - (4*I)*Sin[3*e])*Tan[e])*(a + I*a*Tan[e + f*x])^3)/(Cos[f*x] + I*Sin[f*x])^3

________________________________________________________________________________________

fricas [B]  time = 0.52, size = 553, normalized size = 2.91 \[ \frac {-90 i \, a^{3} c^{3} - 390 \, a^{3} c^{2} d + 450 i \, a^{3} c d^{2} + 166 \, a^{3} d^{3} + {\left (-120 i \, a^{3} c^{3} - 720 \, a^{3} c^{2} d + 1080 i \, a^{3} c d^{2} + 480 \, a^{3} d^{3}\right )} e^{\left (8 i \, f x + 8 i \, e\right )} + {\left (-450 i \, a^{3} c^{3} - 2430 \, a^{3} c^{2} d + 3150 i \, a^{3} c d^{2} + 1170 \, a^{3} d^{3}\right )} e^{\left (6 i \, f x + 6 i \, e\right )} + {\left (-630 i \, a^{3} c^{3} - 3090 \, a^{3} c^{2} d + 3690 i \, a^{3} c d^{2} + 1390 \, a^{3} d^{3}\right )} e^{\left (4 i \, f x + 4 i \, e\right )} + {\left (-390 i \, a^{3} c^{3} - 1770 \, a^{3} c^{2} d + 2070 i \, a^{3} c d^{2} + 770 \, a^{3} d^{3}\right )} e^{\left (2 i \, f x + 2 i \, e\right )} + {\left (-60 i \, a^{3} c^{3} - 180 \, a^{3} c^{2} d + 180 i \, a^{3} c d^{2} + 60 \, a^{3} d^{3} + {\left (-60 i \, a^{3} c^{3} - 180 \, a^{3} c^{2} d + 180 i \, a^{3} c d^{2} + 60 \, a^{3} d^{3}\right )} e^{\left (10 i \, f x + 10 i \, e\right )} + {\left (-300 i \, a^{3} c^{3} - 900 \, a^{3} c^{2} d + 900 i \, a^{3} c d^{2} + 300 \, a^{3} d^{3}\right )} e^{\left (8 i \, f x + 8 i \, e\right )} + {\left (-600 i \, a^{3} c^{3} - 1800 \, a^{3} c^{2} d + 1800 i \, a^{3} c d^{2} + 600 \, a^{3} d^{3}\right )} e^{\left (6 i \, f x + 6 i \, e\right )} + {\left (-600 i \, a^{3} c^{3} - 1800 \, a^{3} c^{2} d + 1800 i \, a^{3} c d^{2} + 600 \, a^{3} d^{3}\right )} e^{\left (4 i \, f x + 4 i \, e\right )} + {\left (-300 i \, a^{3} c^{3} - 900 \, a^{3} c^{2} d + 900 i \, a^{3} c d^{2} + 300 \, a^{3} d^{3}\right )} e^{\left (2 i \, f x + 2 i \, e\right )}\right )} \log \left (e^{\left (2 i \, f x + 2 i \, e\right )} + 1\right )}{15 \, {\left (f e^{\left (10 i \, f x + 10 i \, e\right )} + 5 \, f e^{\left (8 i \, f x + 8 i \, e\right )} + 10 \, f e^{\left (6 i \, f x + 6 i \, e\right )} + 10 \, f e^{\left (4 i \, f x + 4 i \, e\right )} + 5 \, f e^{\left (2 i \, f x + 2 i \, e\right )} + f\right )}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+I*a*tan(f*x+e))^3*(c+d*tan(f*x+e))^3,x, algorithm="fricas")

[Out]

1/15*(-90*I*a^3*c^3 - 390*a^3*c^2*d + 450*I*a^3*c*d^2 + 166*a^3*d^3 + (-120*I*a^3*c^3 - 720*a^3*c^2*d + 1080*I
*a^3*c*d^2 + 480*a^3*d^3)*e^(8*I*f*x + 8*I*e) + (-450*I*a^3*c^3 - 2430*a^3*c^2*d + 3150*I*a^3*c*d^2 + 1170*a^3
*d^3)*e^(6*I*f*x + 6*I*e) + (-630*I*a^3*c^3 - 3090*a^3*c^2*d + 3690*I*a^3*c*d^2 + 1390*a^3*d^3)*e^(4*I*f*x + 4
*I*e) + (-390*I*a^3*c^3 - 1770*a^3*c^2*d + 2070*I*a^3*c*d^2 + 770*a^3*d^3)*e^(2*I*f*x + 2*I*e) + (-60*I*a^3*c^
3 - 180*a^3*c^2*d + 180*I*a^3*c*d^2 + 60*a^3*d^3 + (-60*I*a^3*c^3 - 180*a^3*c^2*d + 180*I*a^3*c*d^2 + 60*a^3*d
^3)*e^(10*I*f*x + 10*I*e) + (-300*I*a^3*c^3 - 900*a^3*c^2*d + 900*I*a^3*c*d^2 + 300*a^3*d^3)*e^(8*I*f*x + 8*I*
e) + (-600*I*a^3*c^3 - 1800*a^3*c^2*d + 1800*I*a^3*c*d^2 + 600*a^3*d^3)*e^(6*I*f*x + 6*I*e) + (-600*I*a^3*c^3
- 1800*a^3*c^2*d + 1800*I*a^3*c*d^2 + 600*a^3*d^3)*e^(4*I*f*x + 4*I*e) + (-300*I*a^3*c^3 - 900*a^3*c^2*d + 900
*I*a^3*c*d^2 + 300*a^3*d^3)*e^(2*I*f*x + 2*I*e))*log(e^(2*I*f*x + 2*I*e) + 1))/(f*e^(10*I*f*x + 10*I*e) + 5*f*
e^(8*I*f*x + 8*I*e) + 10*f*e^(6*I*f*x + 6*I*e) + 10*f*e^(4*I*f*x + 4*I*e) + 5*f*e^(2*I*f*x + 2*I*e) + f)

________________________________________________________________________________________

giac [B]  time = 6.00, size = 1117, normalized size = 5.88 \[ \text {result too large to display} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+I*a*tan(f*x+e))^3*(c+d*tan(f*x+e))^3,x, algorithm="giac")

[Out]

1/15*(-60*I*a^3*c^3*e^(10*I*f*x + 10*I*e)*log(e^(2*I*f*x + 2*I*e) + 1) - 180*a^3*c^2*d*e^(10*I*f*x + 10*I*e)*l
og(e^(2*I*f*x + 2*I*e) + 1) + 180*I*a^3*c*d^2*e^(10*I*f*x + 10*I*e)*log(e^(2*I*f*x + 2*I*e) + 1) + 60*a^3*d^3*
e^(10*I*f*x + 10*I*e)*log(e^(2*I*f*x + 2*I*e) + 1) - 300*I*a^3*c^3*e^(8*I*f*x + 8*I*e)*log(e^(2*I*f*x + 2*I*e)
 + 1) - 900*a^3*c^2*d*e^(8*I*f*x + 8*I*e)*log(e^(2*I*f*x + 2*I*e) + 1) + 900*I*a^3*c*d^2*e^(8*I*f*x + 8*I*e)*l
og(e^(2*I*f*x + 2*I*e) + 1) + 300*a^3*d^3*e^(8*I*f*x + 8*I*e)*log(e^(2*I*f*x + 2*I*e) + 1) - 600*I*a^3*c^3*e^(
6*I*f*x + 6*I*e)*log(e^(2*I*f*x + 2*I*e) + 1) - 1800*a^3*c^2*d*e^(6*I*f*x + 6*I*e)*log(e^(2*I*f*x + 2*I*e) + 1
) + 1800*I*a^3*c*d^2*e^(6*I*f*x + 6*I*e)*log(e^(2*I*f*x + 2*I*e) + 1) + 600*a^3*d^3*e^(6*I*f*x + 6*I*e)*log(e^
(2*I*f*x + 2*I*e) + 1) - 600*I*a^3*c^3*e^(4*I*f*x + 4*I*e)*log(e^(2*I*f*x + 2*I*e) + 1) - 1800*a^3*c^2*d*e^(4*
I*f*x + 4*I*e)*log(e^(2*I*f*x + 2*I*e) + 1) + 1800*I*a^3*c*d^2*e^(4*I*f*x + 4*I*e)*log(e^(2*I*f*x + 2*I*e) + 1
) + 600*a^3*d^3*e^(4*I*f*x + 4*I*e)*log(e^(2*I*f*x + 2*I*e) + 1) - 300*I*a^3*c^3*e^(2*I*f*x + 2*I*e)*log(e^(2*
I*f*x + 2*I*e) + 1) - 900*a^3*c^2*d*e^(2*I*f*x + 2*I*e)*log(e^(2*I*f*x + 2*I*e) + 1) + 900*I*a^3*c*d^2*e^(2*I*
f*x + 2*I*e)*log(e^(2*I*f*x + 2*I*e) + 1) + 300*a^3*d^3*e^(2*I*f*x + 2*I*e)*log(e^(2*I*f*x + 2*I*e) + 1) - 120
*I*a^3*c^3*e^(8*I*f*x + 8*I*e) - 720*a^3*c^2*d*e^(8*I*f*x + 8*I*e) + 1080*I*a^3*c*d^2*e^(8*I*f*x + 8*I*e) + 48
0*a^3*d^3*e^(8*I*f*x + 8*I*e) - 450*I*a^3*c^3*e^(6*I*f*x + 6*I*e) - 2430*a^3*c^2*d*e^(6*I*f*x + 6*I*e) + 3150*
I*a^3*c*d^2*e^(6*I*f*x + 6*I*e) + 1170*a^3*d^3*e^(6*I*f*x + 6*I*e) - 630*I*a^3*c^3*e^(4*I*f*x + 4*I*e) - 3090*
a^3*c^2*d*e^(4*I*f*x + 4*I*e) + 3690*I*a^3*c*d^2*e^(4*I*f*x + 4*I*e) + 1390*a^3*d^3*e^(4*I*f*x + 4*I*e) - 390*
I*a^3*c^3*e^(2*I*f*x + 2*I*e) - 1770*a^3*c^2*d*e^(2*I*f*x + 2*I*e) + 2070*I*a^3*c*d^2*e^(2*I*f*x + 2*I*e) + 77
0*a^3*d^3*e^(2*I*f*x + 2*I*e) - 60*I*a^3*c^3*log(e^(2*I*f*x + 2*I*e) + 1) - 180*a^3*c^2*d*log(e^(2*I*f*x + 2*I
*e) + 1) + 180*I*a^3*c*d^2*log(e^(2*I*f*x + 2*I*e) + 1) + 60*a^3*d^3*log(e^(2*I*f*x + 2*I*e) + 1) - 90*I*a^3*c
^3 - 390*a^3*c^2*d + 450*I*a^3*c*d^2 + 166*a^3*d^3)/(f*e^(10*I*f*x + 10*I*e) + 5*f*e^(8*I*f*x + 8*I*e) + 10*f*
e^(6*I*f*x + 6*I*e) + 10*f*e^(4*I*f*x + 4*I*e) + 5*f*e^(2*I*f*x + 2*I*e) + f)

________________________________________________________________________________________

maple [B]  time = 0.02, size = 443, normalized size = 2.33 \[ -\frac {4 i a^{3} d^{3} \tan \left (f x +e \right )}{f}-\frac {i a^{3} d^{3} \left (\tan ^{5}\left (f x +e \right )\right )}{5 f}+\frac {4 i a^{3} \arctan \left (\tan \left (f x +e \right )\right ) d^{3}}{f}-\frac {i a^{3} \left (\tan ^{2}\left (f x +e \right )\right ) c^{3}}{2 f}-\frac {3 a^{3} d^{3} \left (\tan ^{4}\left (f x +e \right )\right )}{4 f}+\frac {12 i a^{3} c^{2} d \tan \left (f x +e \right )}{f}-\frac {i a^{3} \left (\tan ^{3}\left (f x +e \right )\right ) c^{2} d}{f}-\frac {3 a^{3} \left (\tan ^{3}\left (f x +e \right )\right ) c \,d^{2}}{f}-\frac {3 i a^{3} \left (\tan ^{4}\left (f x +e \right )\right ) c \,d^{2}}{4 f}+\frac {4 i a^{3} \left (\tan ^{3}\left (f x +e \right )\right ) d^{3}}{3 f}-\frac {9 a^{3} \left (\tan ^{2}\left (f x +e \right )\right ) c^{2} d}{2 f}+\frac {2 a^{3} \left (\tan ^{2}\left (f x +e \right )\right ) d^{3}}{f}-\frac {3 a^{3} c^{3} \tan \left (f x +e \right )}{f}+\frac {12 a^{3} \tan \left (f x +e \right ) c \,d^{2}}{f}-\frac {12 i a^{3} \arctan \left (\tan \left (f x +e \right )\right ) c^{2} d}{f}+\frac {2 i a^{3} \ln \left (1+\tan ^{2}\left (f x +e \right )\right ) c^{3}}{f}+\frac {6 a^{3} \ln \left (1+\tan ^{2}\left (f x +e \right )\right ) c^{2} d}{f}-\frac {2 a^{3} \ln \left (1+\tan ^{2}\left (f x +e \right )\right ) d^{3}}{f}-\frac {6 i a^{3} \ln \left (1+\tan ^{2}\left (f x +e \right )\right ) c \,d^{2}}{f}+\frac {6 i a^{3} \left (\tan ^{2}\left (f x +e \right )\right ) c \,d^{2}}{f}+\frac {4 a^{3} \arctan \left (\tan \left (f x +e \right )\right ) c^{3}}{f}-\frac {12 a^{3} \arctan \left (\tan \left (f x +e \right )\right ) c \,d^{2}}{f} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((a+I*a*tan(f*x+e))^3*(c+d*tan(f*x+e))^3,x)

[Out]

-4*I/f*a^3*d^3*tan(f*x+e)-1/5*I/f*a^3*d^3*tan(f*x+e)^5+4*I/f*a^3*arctan(tan(f*x+e))*d^3-1/2*I/f*a^3*tan(f*x+e)
^2*c^3-3/4/f*a^3*d^3*tan(f*x+e)^4+12*I/f*a^3*c^2*d*tan(f*x+e)-I/f*a^3*tan(f*x+e)^3*c^2*d-3/f*a^3*tan(f*x+e)^3*
c*d^2-3/4*I/f*a^3*tan(f*x+e)^4*c*d^2+4/3*I/f*a^3*tan(f*x+e)^3*d^3-9/2/f*a^3*tan(f*x+e)^2*c^2*d+2/f*a^3*tan(f*x
+e)^2*d^3-3*a^3*c^3*tan(f*x+e)/f+12/f*a^3*tan(f*x+e)*c*d^2-12*I/f*a^3*arctan(tan(f*x+e))*c^2*d+2*I/f*a^3*ln(1+
tan(f*x+e)^2)*c^3+6/f*a^3*ln(1+tan(f*x+e)^2)*c^2*d-2/f*a^3*ln(1+tan(f*x+e)^2)*d^3-6*I/f*a^3*ln(1+tan(f*x+e)^2)
*c*d^2+6*I/f*a^3*tan(f*x+e)^2*c*d^2+4/f*a^3*arctan(tan(f*x+e))*c^3-12/f*a^3*arctan(tan(f*x+e))*c*d^2

________________________________________________________________________________________

maxima [A]  time = 0.42, size = 263, normalized size = 1.38 \[ -\frac {12 i \, a^{3} d^{3} \tan \left (f x + e\right )^{5} + 45 \, {\left (i \, a^{3} c d^{2} + a^{3} d^{3}\right )} \tan \left (f x + e\right )^{4} - {\left (-60 i \, a^{3} c^{2} d - 180 \, a^{3} c d^{2} + 80 i \, a^{3} d^{3}\right )} \tan \left (f x + e\right )^{3} - {\left (-30 i \, a^{3} c^{3} - 270 \, a^{3} c^{2} d + 360 i \, a^{3} c d^{2} + 120 \, a^{3} d^{3}\right )} \tan \left (f x + e\right )^{2} - 60 \, {\left (4 \, a^{3} c^{3} - 12 i \, a^{3} c^{2} d - 12 \, a^{3} c d^{2} + 4 i \, a^{3} d^{3}\right )} {\left (f x + e\right )} - 60 \, {\left (2 i \, a^{3} c^{3} + 6 \, a^{3} c^{2} d - 6 i \, a^{3} c d^{2} - 2 \, a^{3} d^{3}\right )} \log \left (\tan \left (f x + e\right )^{2} + 1\right ) + {\left (180 \, a^{3} c^{3} - 720 i \, a^{3} c^{2} d - 720 \, a^{3} c d^{2} + 240 i \, a^{3} d^{3}\right )} \tan \left (f x + e\right )}{60 \, f} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+I*a*tan(f*x+e))^3*(c+d*tan(f*x+e))^3,x, algorithm="maxima")

[Out]

-1/60*(12*I*a^3*d^3*tan(f*x + e)^5 + 45*(I*a^3*c*d^2 + a^3*d^3)*tan(f*x + e)^4 - (-60*I*a^3*c^2*d - 180*a^3*c*
d^2 + 80*I*a^3*d^3)*tan(f*x + e)^3 - (-30*I*a^3*c^3 - 270*a^3*c^2*d + 360*I*a^3*c*d^2 + 120*a^3*d^3)*tan(f*x +
 e)^2 - 60*(4*a^3*c^3 - 12*I*a^3*c^2*d - 12*a^3*c*d^2 + 4*I*a^3*d^3)*(f*x + e) - 60*(2*I*a^3*c^3 + 6*a^3*c^2*d
 - 6*I*a^3*c*d^2 - 2*a^3*d^3)*log(tan(f*x + e)^2 + 1) + (180*a^3*c^3 - 720*I*a^3*c^2*d - 720*a^3*c*d^2 + 240*I
*a^3*d^3)*tan(f*x + e))/f

________________________________________________________________________________________

mupad [B]  time = 5.19, size = 356, normalized size = 1.87 \[ -\frac {{\mathrm {tan}\left (e+f\,x\right )}^4\,\left (\frac {a^3\,d^3}{4}+\frac {a^3\,d^2\,\left (2\,d+c\,3{}\mathrm {i}\right )}{4}\right )}{f}-\frac {\mathrm {tan}\left (e+f\,x\right )\,\left (a^3\,d^3\,1{}\mathrm {i}-a^3\,c\,\left (c^2\,1{}\mathrm {i}+6\,c\,d-d^2\,3{}\mathrm {i}\right )\,1{}\mathrm {i}-a^3\,d\,\left (c^2\,3{}\mathrm {i}+6\,c\,d-d^2\,1{}\mathrm {i}\right )+a^3\,c^2\,\left (2\,c-d\,3{}\mathrm {i}\right )+a^3\,d^2\,\left (2\,d+c\,3{}\mathrm {i}\right )\,1{}\mathrm {i}\right )}{f}+\frac {\ln \left (\mathrm {tan}\left (e+f\,x\right )+1{}\mathrm {i}\right )\,\left (a^3\,c^3\,4{}\mathrm {i}+12\,a^3\,c^2\,d-a^3\,c\,d^2\,12{}\mathrm {i}-4\,a^3\,d^3\right )}{f}+\frac {{\mathrm {tan}\left (e+f\,x\right )}^3\,\left (\frac {a^3\,d^3\,1{}\mathrm {i}}{3}-\frac {a^3\,d\,\left (c^2\,3{}\mathrm {i}+6\,c\,d-d^2\,1{}\mathrm {i}\right )}{3}+\frac {a^3\,d^2\,\left (2\,d+c\,3{}\mathrm {i}\right )\,1{}\mathrm {i}}{3}\right )}{f}+\frac {{\mathrm {tan}\left (e+f\,x\right )}^2\,\left (\frac {a^3\,d^3}{2}-\frac {a^3\,c\,\left (c^2\,1{}\mathrm {i}+6\,c\,d-d^2\,3{}\mathrm {i}\right )}{2}+\frac {a^3\,d\,\left (c^2\,3{}\mathrm {i}+6\,c\,d-d^2\,1{}\mathrm {i}\right )\,1{}\mathrm {i}}{2}+\frac {a^3\,d^2\,\left (2\,d+c\,3{}\mathrm {i}\right )}{2}\right )}{f}-\frac {a^3\,d^3\,{\mathrm {tan}\left (e+f\,x\right )}^5\,1{}\mathrm {i}}{5\,f} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((a + a*tan(e + f*x)*1i)^3*(c + d*tan(e + f*x))^3,x)

[Out]

(log(tan(e + f*x) + 1i)*(a^3*c^3*4i - 4*a^3*d^3 - a^3*c*d^2*12i + 12*a^3*c^2*d))/f - (tan(e + f*x)*(a^3*d^3*1i
 - a^3*c*(6*c*d + c^2*1i - d^2*3i)*1i - a^3*d*(6*c*d + c^2*3i - d^2*1i) + a^3*c^2*(2*c - d*3i) + a^3*d^2*(c*3i
 + 2*d)*1i))/f - (tan(e + f*x)^4*((a^3*d^3)/4 + (a^3*d^2*(c*3i + 2*d))/4))/f + (tan(e + f*x)^3*((a^3*d^3*1i)/3
 - (a^3*d*(6*c*d + c^2*3i - d^2*1i))/3 + (a^3*d^2*(c*3i + 2*d)*1i)/3))/f + (tan(e + f*x)^2*((a^3*d^3)/2 - (a^3
*c*(6*c*d + c^2*1i - d^2*3i))/2 + (a^3*d*(6*c*d + c^2*3i - d^2*1i)*1i)/2 + (a^3*d^2*(c*3i + 2*d))/2))/f - (a^3
*d^3*tan(e + f*x)^5*1i)/(5*f)

________________________________________________________________________________________

sympy [B]  time = 1.60, size = 486, normalized size = 2.56 \[ - \frac {4 i a^{3} \left (c - i d\right )^{3} \log {\left (e^{2 i f x} + e^{- 2 i e} \right )}}{f} + \frac {90 a^{3} c^{3} - 390 i a^{3} c^{2} d - 450 a^{3} c d^{2} + 166 i a^{3} d^{3} + \left (390 a^{3} c^{3} e^{2 i e} - 1770 i a^{3} c^{2} d e^{2 i e} - 2070 a^{3} c d^{2} e^{2 i e} + 770 i a^{3} d^{3} e^{2 i e}\right ) e^{2 i f x} + \left (630 a^{3} c^{3} e^{4 i e} - 3090 i a^{3} c^{2} d e^{4 i e} - 3690 a^{3} c d^{2} e^{4 i e} + 1390 i a^{3} d^{3} e^{4 i e}\right ) e^{4 i f x} + \left (450 a^{3} c^{3} e^{6 i e} - 2430 i a^{3} c^{2} d e^{6 i e} - 3150 a^{3} c d^{2} e^{6 i e} + 1170 i a^{3} d^{3} e^{6 i e}\right ) e^{6 i f x} + \left (120 a^{3} c^{3} e^{8 i e} - 720 i a^{3} c^{2} d e^{8 i e} - 1080 a^{3} c d^{2} e^{8 i e} + 480 i a^{3} d^{3} e^{8 i e}\right ) e^{8 i f x}}{15 i f e^{10 i e} e^{10 i f x} + 75 i f e^{8 i e} e^{8 i f x} + 150 i f e^{6 i e} e^{6 i f x} + 150 i f e^{4 i e} e^{4 i f x} + 75 i f e^{2 i e} e^{2 i f x} + 15 i f} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+I*a*tan(f*x+e))**3*(c+d*tan(f*x+e))**3,x)

[Out]

-4*I*a**3*(c - I*d)**3*log(exp(2*I*f*x) + exp(-2*I*e))/f + (90*a**3*c**3 - 390*I*a**3*c**2*d - 450*a**3*c*d**2
 + 166*I*a**3*d**3 + (390*a**3*c**3*exp(2*I*e) - 1770*I*a**3*c**2*d*exp(2*I*e) - 2070*a**3*c*d**2*exp(2*I*e) +
 770*I*a**3*d**3*exp(2*I*e))*exp(2*I*f*x) + (630*a**3*c**3*exp(4*I*e) - 3090*I*a**3*c**2*d*exp(4*I*e) - 3690*a
**3*c*d**2*exp(4*I*e) + 1390*I*a**3*d**3*exp(4*I*e))*exp(4*I*f*x) + (450*a**3*c**3*exp(6*I*e) - 2430*I*a**3*c*
*2*d*exp(6*I*e) - 3150*a**3*c*d**2*exp(6*I*e) + 1170*I*a**3*d**3*exp(6*I*e))*exp(6*I*f*x) + (120*a**3*c**3*exp
(8*I*e) - 720*I*a**3*c**2*d*exp(8*I*e) - 1080*a**3*c*d**2*exp(8*I*e) + 480*I*a**3*d**3*exp(8*I*e))*exp(8*I*f*x
))/(15*I*f*exp(10*I*e)*exp(10*I*f*x) + 75*I*f*exp(8*I*e)*exp(8*I*f*x) + 150*I*f*exp(6*I*e)*exp(6*I*f*x) + 150*
I*f*exp(4*I*e)*exp(4*I*f*x) + 75*I*f*exp(2*I*e)*exp(2*I*f*x) + 15*I*f)

________________________________________________________________________________________